package edu.iscas.xcheck.analysis.dom.model;

import edu.iscas.xcheck.analysis.info.DirInfo;



public class BrowserEvent {
	private final static String ROOT_DIR = DirInfo.getScreenshot();
	private String type;
	private String path;
	private MutationEvent mutation;
	private String image;
	private int state = -1;
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public MutationEvent getMutation() {
		return mutation;
	}
	public void setMutation(MutationEvent mutation) {
		this.mutation = mutation;
	}
	public String getPath() {
		return path;
	}
	public void setPath(String path) {
		this.path = path;
	}
	public String getImage() {
		return image;
	}
	public String getAbsoluteImage(){
		if(image==null) return null;
		return ROOT_DIR+image;
	}
	public void setImage(String image) {
		this.image = image;
	}
	public int getState() {
		return state;
	}
	public void setState(int state) {
		this.state = state;
	}
	@Override
	public String toString() {
		return "BrowserEvent [type=" + type + ", path=" + path + ", mutation=" + mutation + ", image=" + image
				+ ", state=" + state + "]";
	}
	
}
